package cn.cdutetc.library.entity.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 图书导出VO
 */
@Data
public class BookExportVo {

    @ExcelProperty(value = "图书ID", index = 0)
    private Integer bookId;

    @ExcelProperty(value = "ISBN号", index = 1)
    private String isbn;

    @ExcelProperty(value = "图书名称", index = 2)
    private String bookName;

    @ExcelProperty(value = "作者", index = 3)
    private String author;

    @ExcelProperty(value = "出版社", index = 4)
    private String publisher;

    @ExcelProperty(value = "出版日期", index = 5)
    @DateTimeFormat("yyyy-MM-dd")
    private LocalDate publishDate;

    @ExcelProperty(value = "分类名称", index = 6)
    private String categoryName;

    @ExcelProperty(value = "图书价格", index = 7)
    @NumberFormat("#.##")
    private BigDecimal price;

    @ExcelProperty(value = "总册数", index = 8)
    private Integer totalCopies;

    @ExcelProperty(value = "在库数量", index = 9)
    private Integer inStockCount;

    @ExcelProperty(value = "借出数量", index = 10)
    private Integer borrowedCount;

    @ExcelProperty(value = "异常数量", index = 11)
    private Integer abnormalCount;

    @ExcelProperty(value = "图书位置", index = 12)
    private String location;

    @ExcelProperty(value = "图书简介", index = 13)
    private String description;

}
